// 微信小程序订阅消息
import type { IObj } from '@/interface'

export function subscribeMessageFn(options = {}) {
    uni.requestSubscribeMessage({
        tmplIds: ['VZLNvaYj_cpELwU7yxAjd_jMsiNTIp2qTqRLwzNh9OI'],
        success() {
            console.log('订阅成功')
        },
        fail(err: IObj) {
            console.log(err, '订阅失败')
        },
        complete() {
            // if (options.isNeedJump) {
            //     const timeoutId = setTimeout(() => {
            //         Router.push(options.path, options.params)
            //         clearTimeout(timeoutId)
            //     }, 1500)
            // }
        },
    })
}
